The wave equation (\ref{eqn:vecwave}) expanded in the rectangular
coordinate system is shown below.
\begin{equation}\begin{split}
    \left(\frac{\partial^2}{\partial{x}^2}+\frac{\partial^2}{\partial{y}^2}+\frac{\partial^2}{\partial{z}^2}\right){A_x}\hat{x}+
    \left(\frac{\partial^2}{\partial{x}^2}+\frac{\partial^2}{\partial{y}^2}+\frac{\partial^2}{\partial{z}^2}\right){A_y}\hat{y}+\\
    \left(\frac{\partial^2}{\partial{x}^2}+\frac{\partial^2}{\partial{y}^2}+\frac{\partial^2}{\partial{z}^2}\right){A_z}\hat{z}
    =\gamma^2\left(A_x\hat{x}+A_y\hat{y}+A_z\hat{z}\right)
    =-k^2\left(A_x\hat{x}+A_y\hat{y}+A_z\hat{z}\right)
\end{split}\end{equation}
Equating components yields a set of three independent scalar wave
equations.
\begin{align}
    \nabla^2{A_x}&=\gamma^2{A_x}=-k^2{A_x}\\
    \nabla^2{A_y}&=\gamma^2{A_y}=-k^2{A_y}\\
    \nabla^2{A_z}&=\gamma^2{A_z}=-k^2{A_z}
\end{align}
where,
\begin{equation}
    \nabla^2=\frac{\partial^2}{\partial{x}^2}+\frac{\partial^2}{\partial{y}^2}+\frac{\partial^2}{\partial{z}^2}
\end{equation}
When any one of these equations is solved, the other two
can be solved by inspection.  Therefore, the symbol $\psi$ will be
used to represent any of the three scalar components $A_x$, $A_y$
or $A_z$.  Using this notation, the scalar wave equation has the
following form.
\begin{equation}\label{eqn:swe}
    \nabla^2{\psi}=\gamma^2{\psi}=-k^2{\psi}
\end{equation}
The \emph{separation of variables} technique prescribes that the
scalar function $\psi$ be set equal to the product of three scalar functions that
depend on only one, but separate variable.
\begin{equation}\label{eqn:phi}
    \psi(x,y,z)=X(x)Y(y)Z(z)
\end{equation}
Substituting (\ref{eqn:phi}) into (\ref{eqn:swe}) yields,
\begin{equation}
    \frac{d^2X}{d{x}^2}YZ+X\frac{d^2Y}{d{y}^2}Z+XY\frac{d^2Z}{d{z}^2}=\gamma^2XYZ=-k^2XYZ
\end{equation}
where the partial derivatives were changed to ordinary
derivatives. Dividing both sides by $X(x)Y(y)Z(z)$ gives,
\begin{equation}\label{eqn:sep}
    \frac{1}{X}\frac{d^2X}{d{x}^2}+\frac{1}{Y}\frac{d^2Y}{d{y}^2}+\frac{1}{Z}\frac{d^2Z}{d{z}^2}=\gamma^2=-k^2
\end{equation}
Each of the first three terms in (\ref{eqn:sep}) is a function of
a distinct variable.  Also each term sums to equal a constant. The
only way possible for these three terms to sum to a constant is
each term be a constant itself.
\begin{align}
    \frac{1}{X}\frac{d^2X}{d{x}^2}&=\gamma_x^2=-k_x^2\label{eqn:ssx}\\
    \frac{1}{Y}\frac{d^2Y}{d{y}^2}&=\gamma_y^2=-k_y^2\label{eqn:ssy}\\
    \frac{1}{Z}\frac{d^2Z}{d{z}^2}&=\gamma_z^2=-k_z^2\label{eqn:ssz}
\end{align}
Rearranging (\ref{eqn:ssx})--(\ref{eqn:ssz}) yields a set of three
independent ordinary differential equations.
\begin{align}
    \frac{d^2X}{d{x}^2}&=\gamma_x^2X=-k_x^2X\label{eqn:dx}\\
    \frac{d^2Y}{d{y}^2}&=\gamma_y^2Y=-k_y^2Y\label{eqn:dy}\\
    \frac{d^2Z}{d{z}^2}&=\gamma_z^2Z=-k_z^2Z\label{eqn:dz}
\end{align}
Since each term is a constant then the following condition known
as the \emph{constraint equation} is true.
\begin{equation}\label{eqn:constraint}
    \gamma^2=\gamma_x^2+\gamma_y^2+\gamma_z^2=-k^2=-k_x^2-k_y^2-k_z^2
\end{equation}
Solutions to (\ref{eqn:dx})--(\ref{eqn:dz}) can be found in forms
or \emph{traveling waves} and \emph{standing waves} as described in the previous sections \ref{sec:travelingwaves} and \ref{sec:standingwaves}.


